﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="quan_tri_trang_chuc_nang.ascx.cs" Inherits="quan_tri_trang_chuc_nang" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
        function Window_Close() {
            $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");
        }
    </script>
</telerik:RadCodeBlock>

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="Ajax_Request" 
    DefaultLoadingPanelID="RadAjaxLoadingPanel1">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="grdFunctionPage" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="grdFunctionPage">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadWindowManager1" />
                <telerik:AjaxUpdatedControl ControlID="grdFunctionPage" />
                <telerik:AjaxUpdatedControl ControlID="lblMessage" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
</telerik:RadAjaxLoadingPanel>

<telerik:RadWindowManager OnClientClose="Window_Close" ID="RadWindowManager1" runat="server" >
    <Windows>
        <telerik:RadWindow VisibleStatusbar="false" Width="800px" Height="600px" runat="server" ID="windows1"></telerik:RadWindow>
    </Windows>
</telerik:RadWindowManager>

<asp:Label runat="server" ID="lblMessage"></asp:Label>

<fieldset>
<legend><span style="color:Blue">QUẢN TRỊ TRANG CHỨC NĂNG</span></legend>
<div style="width:100%">
    <table width="100%">
        <tr>
            <td style="width:80%">  </td>
            <td align="right"><a href="/Admin/Form/FunctionPage_Add.aspx" class="link-add-new" ><img src="/Image/add2.png" alt="Thêm mới trang chức năng" title="Thêm mới trang chức năng" />Thêm Mới</a></td>
    </table>
</div>


<telerik:RadGrid  GridLines="Horizontal" AllowFilteringByColumn="True" Skin="WebBlue" OnDeleteCommand="FunctionPage_Delete"  AllowPaging="true" PageSize="10" OnPageIndexChanged="grd_PageIndexChanged" ID="grdFunctionPage"  AutoGenerateColumns="false"  runat="server">
    <MasterTableView>
        <Columns>
            <telerik:GridBoundColumn HeaderText="ID" Display="false" DataField="FunctionPageID"></telerik:GridBoundColumn>
            <telerik:GridTemplateColumn AllowFiltering="true" HeaderText="Tên Trang" DataField="FunctionPageName">
                <ItemTemplate>
                    <asp:LinkButton ID="lblEdit" runat="server"  CommandArgument='<%# Eval("FunctionPageId") %>' CommandName="Edit" OnClick="lbt_Click" ><%# Eval("FunctionPageName") %></asp:LinkButton>
                   
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            
            <telerik:GridImageColumn ImageHeight="80px" ImageWidth="100px" DataImageUrlFields="FunctionPageImage" UniqueName="FunctionPageImage" HeaderText="Ảnh Đại Diện" >
            </telerik:GridImageColumn>
            
            <telerik:GridImageColumn Visible="false"  DataImageUrlFields="FunctionPageIcon" UniqueName="FunctionPageIcon" HeaderText="Icon">
            </telerik:GridImageColumn>
            
            <telerik:GridCheckBoxColumn DataField="IsVisible" UniqueName="IsVisible" HeaderText="Hiển Thị" AllowFiltering="true">
            </telerik:GridCheckBoxColumn>
            
            <telerik:GridCheckBoxColumn DataField="AllowDelete" UniqueName="AllowDelete" HeaderText="Cho Phép Xóa" AllowFiltering="true">
            </telerik:GridCheckBoxColumn>
            
            <telerik:GridBoundColumn DataField="ViewOrder" UniqueName="ViewOrder" HeaderText="Thứ Tự" AllowFiltering="true">
            </telerik:GridBoundColumn>
            
            <telerik:GridBoundColumn DataField="Lang" UniqueName="Lang" HeaderText="Ngôn Ngữ" AllowFiltering="true">
            </telerik:GridBoundColumn>
            
            <telerik:GridCheckBoxColumn DataField="IsAdmin" UniqueName="IsAdmin" HeaderText="Hệ Thống" AllowFiltering="true">
            </telerik:GridCheckBoxColumn>
            
            <telerik:GridBoundColumn DataField="FunctionType" UniqueName="FunctionType" HeaderText="Kiểu Trang" AllowFiltering="true">
            </telerik:GridBoundColumn>
            
            <telerik:GridButtonColumn CommandName="Delete" UniqueName="DeleteColumn" ButtonType="ImageButton" ConfirmText="Bạn có chắc chắn muốn xóa trang chức năng?"  ImageUrl="/Image/delete.png"></telerik:GridButtonColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>
</fieldset>